import {defineStore} from "pinia";
import https from "../utils/https";

export const useTags = defineStore("tags",{
    state:()=>{
        return{
            tagsLists:[] as any,
            total:0,
        }
    },actions:{
    async gettags(id:any){
        let res = await https.get("/api/article/tag/"+id,{params:{page:1,pageSize:12,status:"publish"}});
        // console.log(res,"res")
        if(res.status==200){
            this.tagsLists = res.data.data[0]
            this.total = res.data.data[1]
        }
    }
    },getters:{

    }
})

